package com.ezops.util;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.Properties;



import org.slf4j.Logger;
import org.slf4j.LoggerFactory;




public class LocalSystemProperties extends Properties {


	final static Logger logger = LoggerFactory.getLogger(LocalSystemProperties.class);

	
	
	public ArrayList propertyList = null;
	
	
	public ArrayList getPropertyList() {
		return propertyList;
	}


	public void setPropertyList(ArrayList properties) {
		
		try
		{
			propertyList = properties;
			
			Iterator list = propertyList.iterator();
			while(list.hasNext())
			{
				String prop = (String)list.next();
				String [] parts = prop.split("=");
				logger.debug("Adding property: Name" + parts[0] + " Value:" + parts[1]);
				super.put(parts[0],parts[1]);
				
			}
		}
		catch (Exception e)
		{
			logger.equals(e);
		}
		
	}
	
}

